home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / DDEPASCAL / DDE / !PC / h / dboxquery < prev    next >
Text File  |  1992-02-10  |  2KB  |  59 lines

  1. (* 
  2.  * Title:   dboxquery.h
  3.  * Purpose: display a dialogue box to ask a question, and get reply.
  4.  *
  5.  *)
  6.  
  7. #ifndef __dboxquery_h
  8. #define __dboxquery_h
  9.  
  10. (* ----------------------------- dboxquery --------------------------------
  11.  * Description:   Displays a dialogue box, with YES and NO buttons, and a 
  12.  *                question, and gets reply.
  13.  *
  14.  * Parameters:    char *question -- the question to be asked
  15.  * Returns:       reply by user.
  16.  * Other Info:    Question can be up to 120 chars long, 3 lines of 40 chars
  17.  *                RETURN will reply "yes"; ESCAPE or CLOSE event will
  18.  *                reply "cancel". Note: a call of dbox_query(0), will
  19.  *                reserve space for the dbox and return with no display
  20.  *                This will mean that space is always available for
  21.  *                important things like asking to quit!!
  22.  *                The template for the dialogue box should have the following
  23.  *                attributes:
  24.  *                   window flags -- moveable, auto-redraw
  25.  *                                   Also advisable to have a title icon
  26.  *                                   containing the name of your program
  27.  *                                   (or other suitable text)
  28.  *                   icon #1 -- the message icon -- should have indirected
  29.  *                                                  text flag set, with
  30.  *                                                  buton type "never"
  31.  *                   icon #0 -- the "YES" icon --   should be text icon
  32.  *                                                  with text string set to
  33.  *                                                  "YES"; button type should
  34.  *                                                  be "menu icon"
  35.  *                   icon #2 -- the "NO" icon  --   should be text icon
  36.  *                                                  with text string set to
  37.  *                                                  "NO"; button type should
  38.  *                                                  be "menu icon"
  39.  *
  40.  *                See "query" dialogue box in !Edit for an example.
  41.  *
  42.  *)  
  43.   
  44.  
  45. (* return type for dboxquery *)
  46.  
  47. const dboxquery_YES    = 1;
  48.       dboxquery_NO     = 2;
  49.       dboxquery_CANCEL = 3;
  50.  
  51. type dboxquery_REPLY_ptr = ^dboxquery_REPLY;
  52.      dboxquery_REPLY = integer;
  53.  
  54. function dboxquery(question : string) : dboxquery_REPLY; extern;
  55.  
  56. #endif
  57.  
  58. (* end dboxquery.h *)
  59.